
#include <ttg/all.h>
#include <ttg_ext/cuda_bindings.h>

using namespace ttg::pipeline;
using namespace ttg_ext::bindings;

class cudaHello :public cudaBinding<bool, bool>
{
	public:
		virtual void process(bool data)
		{
			printf("Hello world! (from CUDA binding)\n");
			Sleep(1000);
		}
};

class Hello :public ttg::pipeline::Node<bool, bool>
{
	public:
		virtual void process(bool data)
		{
			printf("Hello world!\n");
			Sleep(1000);
		}
		inline Hello()
			:Node("Hello")
		{ addBinding(new cudaHello()); }
};

int main()
{
	ttg::services::ServiceBase::getRef()->start();
	Pipeline<bool, bool> pl(wrap(new Hello()));
	std::vector<bool> data(4);
	pl.run(data);
	return 0;
}